<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>WitShine 销售管理</title>
    <%= stylesheet_link_tag "scaffold", "depot", :media => "all" %>
    
    <script type="text/javascript">
    </script>
  </head>
  <body>
    
    <div id="banner">
      <%= @page_title || "WitShine 销售管理" %>
    </div>    
    <% if cur_user_name %>
      <div class="navbar">当前用户：<%= cur_user_name %></div>
      <div id="columns">       
        <div id="side"> 
          <h3>订单管理</h3>
          <ul>                      
            <li><%= link_to "订单列表", :controller => 'orders' %> <br/>
            <li><%= link_to "订单查询", :controller => 'store', :action => 'query_order' %> <br/>
            <li><%= link_to "新增订单",   :controller => 'orders', :action => 'new' %> <br/>
          </ul>
          <h3>客户管理</h3>
          <ul>                      
            <li><%= link_to "客户列表", :controller => 'customers' %> <br/>
            <li><%= link_to "客户查询", :controller => 'admin', :action => 'querycustomer' %> <br/>
            <li><%= link_to "增加客户",   :controller => 'customers', :action => 'new' %> <br/>
          </ul>
          <h3>产品管理</h3>
          <ul>
            <li><%= link_to "产品列表",   :controller => 'admin', :action => 'list' %>
            <li><%= link_to "产品查询",   :controller => 'admin', :action => 'query' %>
          </ul>
          <% if admin? %>
            <h3>用户管理</h3>
            <ul>                      
              <li><%= link_to "用户列表", :controller => 'login', :action => 'list_users' %> <br/>
              <li><%= link_to "增加用户",   :controller => 'login', :action => 'add_user' %> <br/>
            </ul>
          <% end %>
          <h3>系统</h3>
          <ul>
            <li><%= link_to "修改用户信息",   :controller => 'login', :action => 'edit_user', :id => cur_user %> <br/>
            <li><%= link_to "退出系统",     :controller => 'login', :action => 'logout' %>
          </ul>
        </div>   
      </div>
    <% end %>
    <div id="main">
      <% if flash[:notice] -%>
        <div id="notice"><%= flash[:notice] %></div>
      <% end -%>
      <% if flash[:error] -%>
        <div id="error"><%= flash[:error] %></div>
      <% end -%>
      <%= yield :layout %>
    </div>
    <div id="footer">
      <p>版权所有&copy;2008</p>
    </div>
  </body>
</html>
